package com.hpeu_12.day1228;

public class MethodDemo03 {
	public int add(int n,int m,int ... nums) {
		System.out.println("n="+n+"m = "+m);
		int sum = 0;
		for (int i : nums) {
			sum+=i;
		}
		return sum;
	}
	public static void main(String[] args) {
		MethodDemo03 methodDemo03 = new MethodDemo03();
		int sum = methodDemo03.add(5,1,2,3,4,5);
		System.out.println("sum="+sum);
	}
}
